<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="/assets/css/text.css" rel="stylesheet" type="text/css">
    <link href="/assets/css/main.css" rel="stylesheet" type="text/css">
    <link href="/assets/css/content.css" rel="stylesheet" type="text/css">
    <script language="javascript" src="/assets/js/common.js"></script>
    <script language="javascript" src="/assets/js/general.js"></script>
    <script language="JavaScript" type="text/JavaScript">
    </script>
    <style>
        #title {
            width: 92%;
            border: 0px;
            margin-bottom: 10px;
        }

        #title td {
            text-align: center;
            height: 20px;
            line-height: 150%
        }

        #title div {
            background-image: url(/assets/img/dot_02.gif);
            background-position: left top;
            background-repeat: no-repeat;
            margin: 0 auto;
            padding-left: 20px;
            text-align: left;
            width: 10%;
            font-size: 15px;
            font-weight: bold;
            color: #CC0000;
            letter-spacing: 2px;
        }
    </style>
</head>
<body>

<table cellspacing="0" cellpadding="0" id="title" align="center">
    <tbody>
    <tr>
        <td nowrap="nowrap">
            <div>角色管理</div>
        </td>
    </tr>
    </tbody>
</table>

<table cellspacing="0" cellpadding="0" class="subtitle">
    <tbody>
    <tr>
        <td class="subtitle">角色管理说明</td>
        <td>&nbsp;</td>
        <td id="rightbg">&nbsp;</td>
    </tr>
    </tbody>
</table>


<table cellpadding="0" cellspacing="0" class="explain_tab">
    <tbody>
    <tr>
        <td class="explain">
            <p align="left">角色的控制在系统中是通过角色的id来进行识别的，设置角色时一定要设置好相应id,系统初始化时默认添加了6个默认角色，不可删除，若角色系统出错且无法修复时请联系系统管理员</p>
        </td>
    </tr>
    </tbody>
</table>
<br>
<table cellpadding="0" cellspacing="0"  align="center" class="datalist">
    <tbody>
    <tr align="center">
        <form action="/role.do" method="post">
            <td align="center">新建角色</td>
            <td>角色id:<input type="number" id="jw_position_id" name="jw_position_id" value="" min="6" style="width:60%;">
            </td>
            <td>角色名称：<input type="text" id="jw_position" name="jw_position" value=""></td>
            <td><input type="checkbox">是否继承已有角色权限<select><c:forEach items="${role}" var="r">
                <option value="${r.position_id}">${r.position}</option>
            </c:forEach></select></td>
            <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" class="button" value="确定" disabled></td>
        </form>
    </tr>
    <tr>
        <th name="td0">角色id</th>
        <th name="td1">角色名称</th>
        <th name="td2" colspan="2">修改权限</th>
        <th name="td3">删除</th>
    </tr>
    <c:forEach items="${role}" var="r">
        <tr align="center">
            <td name="td0">${r.position_id}</td>
            <td name="td1">${r.position}</td>
            <td name="td2" colspan="2"><a id="po" href="/power_user.do#position=${r.position_id}">权限修改</a></td>
            <td name="td3"><a href="/delrole.do?position_id="><img src="/assets/img/icodelete.gif"/></a></td>
        </tr>
    </c:forEach>
    </tbody>
</table>
</body>
</html>